package com.yex.entity;

import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Transient;

import java.math.BigDecimal;
import java.util.Date;

@TableName("tb_user_order")
public class UserOrderEntity {

    /**
     * 用户订单id
     */
    private Integer id;
    /**
     * 订单id
     */
    private Integer orderId;
    /**
     * 订单编号
     */
    private String orderNo;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 购买金额
     */
    private BigDecimal price;
    /**
     * 购买数量
     */
    private BigDecimal number;
    /**
     * 收款银行id
     */
    private Integer bankId;
    /**
     * 订单状态,0:进行中,1:已付款,2:已完成
     */
    private Integer status;
    /**
     * 关闭状态,0:未关闭,1:已关闭
     */
    private Integer isCancel;
    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 订单完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date completeTime;

    @Transient
    private transient MerchantOrderEntity merchantOrderEntity;

    @Transient
    private transient BankEntity userBank;

    @Transient
    private transient BankEntity merchantBank;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getNumber() {
        return number;
    }

    public void setNumber(BigDecimal number) {
        this.number = number;
    }

    public Integer getBankId() {
        return bankId;
    }

    public void setBankId(Integer bankId) {
        this.bankId = bankId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIsCancel() {
        return isCancel;
    }

    public void setIsCancel(Integer isCancel) {
        this.isCancel = isCancel;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public MerchantOrderEntity getMerchantOrderEntity() {
        return merchantOrderEntity;
    }

    public void setMerchantOrderEntity(MerchantOrderEntity merchantOrderEntity) {
        this.merchantOrderEntity = merchantOrderEntity;
    }

    public BankEntity getUserBank() {
        return userBank;
    }

    public void setUserBank(BankEntity userBank) {
        this.userBank = userBank;
    }

    public BankEntity getMerchantBank() {
        return merchantBank;
    }

    public void setMerchantBank(BankEntity merchantBank) {
        this.merchantBank = merchantBank;
    }
}
